<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>见缝插针 - 菠萝玩公众平台</title>
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
  <meta name="keywords" content="core ball,菠萝玩,菠萝玩公众平台,HTML5"/>
  <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  <script src="js/jquery.min.js" language="JavaScript"></script>
  
  
  <style type="text/css">
    body{
        background-color:#c8c8c8;
        overflow: hidden;
        padding:0;
        margin: 0;
    }
    .center-box{
        text-align:center;
        position:absolute;
        width : 300px;
        height : 400px;
        margin : -200px 0 0 -150px;
        left : 50%;
        top : 50%;
    }
    .title{
        font-size: 50px;
        font-family : sans-serif;
    }
    .button{
        position:absolute;
        width : 100px;
        height : 100px;
        left: 50%;
        top : 50%;
        margin : -100px 0 0 -50px;
        border: 2px solid #666;
        color: #666;
        -moz-border-radius: 15px;
        -webkit-border-radius: 15px;
        border-radius:15px;
        font-size:55px;
      }
      
      .button .text{
          font-size:10px;
          padding:0 10px;
          width:80px
      }
      
      .op{
          position:absolute;
          width:200px;
          height:100px;
          left:50%;
          top:75%;
          margin : -50px 0 0 -100px;
		  line-height : 38px;
		  
      }
	  .op_btn{
		float : left;
	  }
      
      .dlg_stage_choose{
          background-color : #ccc;
          border : 1px solid #555;
          overflow-y:scroll;
      }
      
      .dlg_stage_choose ul{
          list-style-type : none;
          text-align : center;
          font-size : 18px;
          padding : 0;
      }
      .dlg_stage_choose li{
          padding : 10px 0;
          border-bottom: 1px solid #bbb;
          
      }
  </style>
</head>

<body>
  <canvas style="display:none;" id="stage"></canvas>
  <div id="begin">
      <section class="center-box">
          <span class="title">见缝插针</span>
          <div class="button">
            <div id="txtAr" style="margin-top: 5px;"></div>
            <div class="text"></div>
          </div>
          <div class="op">
			
			<div class="op_btn" style="margin-top:5px;" ontouchstart="showfx();">
              <a id="btnFX" href="javascript:;"><img data-capture="1" src="image/btn_fx.png"/></a>
              <span id="btnStage2" style="display:inline-block;margin-left: 20px;color:#666">游戏分享</span> 
			</div>			
          </div>
      </section>
      <div style="position:absolute;left:5px; bottom:5px;color:#888;font-size: 12px;">update on 2015-03-29</div>
      <div style="position: absolute;right: 10px; top:10px;">
          <a href="http://mp.weixin.qq.com/s?__biz=MzI0MjAzMDA0MQ==&mid=207084790&idx=1&sn=02bf9203aa3e1b7105d83e09d21db924#rd"> <img src="wx_share.png"/></a>
      </div>
     <!-- <section style="position:absolute; ;right:5px; bottom:5px;color:#888">
        <img style="margin:0 -2px -2px 0;" src="image/WB_logo.png"/>
        <span style="display:inline-block;font-size:12px;font-family: sans-serif;">@随机</span>
      </section>-->
      <section id="wxArrow" style="display: none;">
          <div style="position:absolute;width:100%;height:100%;opacity: 0.7;background-color:#000">
          </div>
          <img style="position: absolute;right:25px;" src="image/arrow.png" ontouchstart="document.getElementById('wxArrow').style.display='none';"/>
      </section>
  </div>
    
    <script type="text/javascript" src="js/index.min.js?v26"></script>
	<script type="text/javascript">
		window.shareData = {
		    "imgUrl": "http://wx.iooook.com/game/coreball/title.png",
		    "timeLineLink": "http://wx.iooook.com/game/coreball/index.html",
		    "homeurl":"http://wx.iooook.com",
		    "tTitle": "见缝插针",
		    "tContent": "一款非常魔性的游戏，强烈地推荐给大家。这个游戏一开始就停不下来了！"
		};
		$(function(){
			var url = location.href;
			$.get("http://wx.iooook.com/SDKAction/JsBridge",{url:url},function(data){
				wx.config({
					appId : data.appId,
					timestamp : data.timestamp,
					nonceStr: data.nonceStr,
					signature: data.signature,
					jsApiList : [
						"onMenuShareTimeline",
						"onMenuShareAppMessage"
					]
				});
			});
			wx.ready(function (){
				var rand = Math.floor(Math.random()*60+5);
				var title = "我在见缝插针中玩到了第"+rand+"关,你敢来挑战我吗？"
                wx.onMenuShareTimeline({
                    title: title, // 分享标题
                    link: window.shareData.timeLineLink, // 分享链接
                    imgUrl: window.shareData.imgUrl, // 分享图标
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
                wx.onMenuShareAppMessage({
                    title: window.shareData.tTitle, // 分享标题
                    desc: window.shareData.tContent, // 分享描述
                    link: window.shareData.timeLineLink, // 分享链接
                    imgUrl: window.shareData.imgUrl, // 分享图标
                    type: '', // 分享类型,music、video或link，不填默认为link
                    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
            });
		});
		function showfx(){
			$("#wxArrow").css('display',"");		
		}
		
	</script>
    
</body>
</html>
